<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" id="c-nowpage" value="edit">
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['2'=>__('Status 2'), '0'=>__('Status 0'), '1'=>__('Status 1')], $row['status']);}
        </div>
    </div>
    <div class="form-group month-plan diy-hidden">
        <label class="control-label col-xs-12 col-sm-2">{:__('g_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-g_id" data-source="plan/indexlist" data-field="title" data-params='{"custom[status]":"2"}' class="form-control selectpage" name="row[g_id]" type="text" value="{$row.g_id|htmlentities}">
        </div>
    </div>
    <div class="form-group week-plan diy-hidden">
        <label class="control-label col-xs-12 col-sm-2">{:__('p_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-p_id" data-source="plan/indexlist" data-field="title" data-params='{"custom[status]":"0"}' class="form-control selectpage" name="row[p_id]" type="text" value="{$row.p_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Project_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" id="admin_id" value="{$admin_id}">
            <input id="c-project_id" data-source="project/index" data-field="title" class="form-control selectpage" name="row[project_id]" type="text"  data-multiple="true" value="{$row.project_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Startime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-startime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[startime]" type="text" value="{:$row.startime?datetime($row.startime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Endtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-endtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{:$row.endtime?datetime($row.endtime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control editor" name="row[remarks]" style="height: 150px;">{$row.remarks|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file" class="form-control" name="row[file]" type="text" value="{$row.file|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-head_portrait" class="btn btn-danger faupload" data-input-id="c-file" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,doc,docx,xls,xlsx" data-multiple="true" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file"></ul>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
